package com.ihealthway.all.view;

import org.nutz.ioc.Ioc;
import org.nutz.log.Log;
import org.nutz.log.Logs;
import org.nutz.mvc.View;
import org.nutz.mvc.ViewMaker;

/**
 * Implements custom view
 * @author 凡梦星尘(elkan1788@gmail.com)
 */
public class ProxyViewMaker implements ViewMaker {

    private static final Log logger = Logs.get();


    @Override
    public View make(Ioc ioc, String type, String value) {
        if("proxy".equalsIgnoreCase(type)){
            logger.infof("Enter proxy server: %s", value);
            return new ProxyRedirectView(value);
        }
        return null;
    }
}
